<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../org/angular.min.js"></script>
    <script src="../org/jquery.min.js"></script>
</head>
<body>
<div ng-app="hd" ng-controller="ctrl">
    <!--ng-submit  $http-->
    <form method="post" action="4.php">
        标题: <input type="text" ng-model="field.title"><br/>
        点击数: <input type="text" ng-model="field.click"><br/>
        内容: <input type="text" ng-model="field.content"><br/>
        <textarea name="data"></textarea>
        <input type="submit">
    </form>
</div>
<script>
    var m = angular.module('hd', []);
    m.controller('ctrl', ['$scope', function ($scope) {
        $scope.field = {title: '后盾人', click: 100,content:'后盾网  人人做后盾'};
        $('form').submit(function () {
            $("[name='data']").val(angular.toJson($scope.field));
        });
    }]);
</script>
</body>
</html>